package spm.project.rememberme;


import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.util.DisplayMetrics;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

public class MenuGame extends Activity {
Button SINGLE_BUTTON, DUEL_BUTTON,ABOUT_BUTTON , EXIT_BUTTON;
Context context;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu);
		DisplayMetrics metrics = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(metrics);
		int height = metrics.heightPixels;
		int width = metrics.widthPixels;

		//---------------------Single Mode----------------------------
		SINGLE_BUTTON = (Button) findViewById(R.id.SingleMode);
		RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams((width*33)/100, (height*7)/100);
		params.setMargins((width*33)/100, (height*28)/100, 0, 0);
		SINGLE_BUTTON.setLayoutParams(params);
		SINGLE_BUTTON.setOnClickListener(new View.OnClickListener() {
    		
    		public void onClick(View v) {
    			Intent i = new Intent(MenuGame.this,
						Difficulty.class);
			
				startActivity(i);
    			// TODO Auto-generated method stub
    			
    		}
    	});
		//---------------------Duel Mode----------------------------
		DUEL_BUTTON = (Button) findViewById(R.id.DuelMode);
		RelativeLayout.LayoutParams params2 = new RelativeLayout.LayoutParams((width*33)/100, (height*7)/100);
		params2.setMargins((width*33)/100, (height*40)/100, 0, 0);
		DUEL_BUTTON.setLayoutParams(params2);
		DUEL_BUTTON.setOnClickListener(new View.OnClickListener() {
    		
    		public void onClick(View v) {
    			Intent i = new Intent(MenuGame.this,
						DualPlayer.class);
			
				startActivity(i);
    			// TODO Auto-generated method stub
    			
    		}
    	});
		//---------------------About----------------------------
		ABOUT_BUTTON = (Button) findViewById(R.id.About);
		RelativeLayout.LayoutParams params3 = new RelativeLayout.LayoutParams((width*33)/100, (height*7)/100);
		params3.setMargins((width*33)/100, (height*52)/100, 0, 0);
		ABOUT_BUTTON.setLayoutParams(params3);
		//---------------------Exit Game----------------------------
		EXIT_BUTTON = (Button) findViewById(R.id.ExitGame);
		RelativeLayout.LayoutParams params4 = new RelativeLayout.LayoutParams((width*33)/100, (height*7)/100);
		params4.setMargins((width*33)/100, (height*64)/100, 0, 0);
		EXIT_BUTTON.setLayoutParams(params4);
		EXIT_BUTTON.setOnClickListener(new View.OnClickListener() {
    		
    		public void onClick(View v) {
    			    			// TODO Auto-generated method stub
    			finish();
    		}
    	});
	}

	
}
